import {
    request
} from "@/utils/request.js"

///dev-api/sendCode get phoneNumber
export const sendCode = (phoneNumber) => {
    console.log("phoneNumber", phoneNumber)
    return request({
        url: '/sendCode?phoneNumber=' + phoneNumber,
        method: 'get',

    })
}

//drive_record/ride_records post
export const ride_records = (GoRideRecords) => {

    return request({
        url: '/drive_record/ride_records',
        method: 'POST',
        data: GoRideRecords
    })
}

//结束行程 一样的只不过是put请求
export const ride_records_end = () => {

    return request({
        url: '/drive_record/ride_records',
        method: 'PUT'
    })
}

//campusId 这个就是区域id 根据区域id去查询这个区域的收费标准
//http://localhost:1024/dev-api/areasFee/areasFee/list?pageNum=1&pageSize=10&areaId=3
// 请求方法:
// GET
// 请求参数:
export const areasFee = (areaId) => {
    return request({
        url: '/areasFee/areasFee/list?pageNum=1&pageSize=10&areaId=' + areaId,
        method: 'get',
    })
}


//drive_record/ride_records/unfinished
export const ride_records_unfinished = () => {

    return request({
        url: '/drive_record/ride_records/unfinished',
        method: 'get',
    })
}

//ride_records_unfinished
export const ride_records_unfinished_id = () => {

    return request({
        url: '/drive_record/ride_records/unfinished',
        method: 'get',
    })
}
//骑行记录列表
//http://localhost:1024/dev-api/drive_record/ride_records/list?pageNum=1&pageSize=10&userid=3
// 请求方法:
// GET
// 请求参数:
export const recordList = (userid) => {
    return request({
        url: '/drive_record/ride_records/list?pageNum=1&pageSize=10&userid=' + userid,
        method: 'get',
    })
}
